Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: show link modal when password is enforced #10104

Merged
merged 3 commits into from
Dec 7, 2023
Merged

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Dec 1, 2023

Description

Show the full expanded link modal for creating links when a password is enforced.

I needed for refactor creating link for this because it was kinda messy and spread all over the place. The main changes:

  • The useFileActionsCreateLinks composable is now being used to create links, no matter how the link is being created (sidebar, quick action, context menu). Previous implementations like in link.ts or FileLinks.vue are now using that action.
    • The composable holds 2 actions, one for normal links, one for quick links. That's the only difference between both.
    • The action(s) can either enforce a modal (important for embed mode) or determine if a modal is necessary by checking if links are enforced.
    • The action(s) have an optional callback. This is needed e.g. when copying quick links, because then we need to copy the created link afterwards and show a different message.
  • The useFileActionsCreateQuicklink composable has been renamed to useFileActionsCopyQuicklink. Its purpose is to check for an existing quick link and either copy that, or let useFileActionsCreateLinks create a new one and then copy that.
  • The messages have been removed from CreateLinkModal. Instead, you can now pass a callback to handle the messages in the parent as this might be highly individual.
  • Our old password modal is now only being used when updating an existing link.

Note that I will add and adjust unit tests in a follow up.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

@JammingBen JammingBen self-assigned this Dec 1, 2023
@delete-merged-branch delete-merged-branch bot deleted the branch master December 5, 2023 10:22
@JammingBen JammingBen changed the base branch from improve-embed-mode-link-sharing to master December 6, 2023 07:57
@JammingBen JammingBen force-pushed the quick-link-modal branch 7 times, most recently from 2f7ab4f to 3a09a4e Compare December 7, 2023 07:17
@owncloud owncloud deleted a comment from update-docs bot Dec 7, 2023
@JammingBen JammingBen marked this pull request as ready for review December 7, 2023 07:18
@JammingBen JammingBen force-pushed the quick-link-modal branch 4 times, most recently from 5d4fd7d to f69c0a9 Compare December 7, 2023 08:10
Show the full expanded link modal for creating links when a password is enforced.
Copy link
Contributor

@AlexAndBear AlexAndBear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor stuff, otherwise it's wonderful 💪

Copy link
Contributor

@AlexAndBear AlexAndBear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some minor stuff, otherwise it's wonderful 💪

Copy link

sonarcloud bot commented Dec 7, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 1 Bug
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

42.9% 42.9% Coverage
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@JammingBen JammingBen merged commit b99b51b into master Dec 7, 2023
3 of 4 checks passed
@delete-merged-branch delete-merged-branch bot deleted the quick-link-modal branch December 7, 2023 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants